翻訳と辞書
Words near each other
・ Alias
・ Alias 'La Gringa'
・ Alias (album)
・ Alias (band)
・ Alias (board game)
・ Alias (comics)
・ Alias (command)
・ Alias (Forgotten Realms)
・ Alias (Mac OS)
・ Alias (musician)
・ Alias (season 1)
・ Alias (season 2)
・ Alias (season 3)
・ Alias (season 4)
・ Alias (season 5)
Alias (SQL)
・ Alias (TV series)
・ Alias (video game)
・ Alias a Gentleman
・ Alias Ali
・ Alias analysis
・ Alias Avidzba
・ Alias Betty
・ Alias Billy the Kid
・ Alias Boston Blackie
・ Alias Eclipse
・ Alias Empire
・ Alias Enterprises
・ Alias Flequillo
・ Alias French Gertie


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Alias (SQL) : ウィキペディア英語版
Alias (SQL)

An alias is a feature of SQL that is supported by most, if not all, relational database management systems (RDBMSs). Aliases provide database administrators, as well as other database users, with the ability to reduce the amount of code required for a query, and to make queries generally simpler to understand. In addition, aliasing can be used as an obfuscation technique to protect the real names of database fields.
In SQL, you can alias both tables themselves, which is called a Correlation Name,〔ANSI Standard SQL - Foundation Document - Date: 2010-10-14〕 or columns. A programmer can temporarily assign another name to a table or column (for the duration of the SELECT query) by using an alias. In other words, it does not actually rename the column or table. This is often useful when either tables or their columns have very long or complex names. An alias name could be anything, but usually it is kept short. For example, it might be common to use a table alias such as "pi" for a table named "price_information".
The general syntax of an alias is SELECT
* FROM table_name () alias_name
. Note that the AS keyword is completely optional and is usually kept for readability purposes. Here is some sample data that the queries below will be referencing:
Using a table alias:

SELECT D.DepartmentName FROM Department AS D

We can also write the same query like this (Note that the AS clause is omitted this time):

SELECT D.DepartmentName FROM Department D

A column alias is similar:

SELECT d.DepartmentId AS Id, d.DepartmentName AS Name FROM Department d

In the returned result sets, the data shown above would be returned, with the only exception being "DepartmentID" would show up as "Id", and "DepartmentName" would show up as "Name".
Also, if only one table is being selected and the query is not using table joins, it is permissible to omit the table name or table alias from the column name in the SELECT statement. Example as follows:

SELECT DepartmentId AS Id, DepartmentName AS Name FROM Department d

==References==


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Alias (SQL)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.